home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
biz
/
demo
/
mrback_b_demo114.lha
/
ARexx_Scripts
/
tapebackup.mrbk
< prev
next >
Wrap
Text File
|
1991-04-01
|
1KB
|
80 lines
/* tapebackup.mrbk */
/* This simple program runs MRBackup, performs a backup, then terminates.
* It utilizes the takecontrol/releasecontrol pair to assure that there
* are no interactive capabilities while in progress.
*/
signal on ERROR
signal on BREAK_C
options results
if ~(Show('P', 'MRBackup_#1')) then do
say "You must run MRBackup first. With a little work, you could"
say "get this ARexx script to do it for you."
exit 1
end
address "MRBackup_#1"
poptofront
backpath = "MRTape:"
setbackpath backpath
if rc ~= 0 then do
say "Failed to set backup path to " || backpath
quit
exit 1
end
homepath = "DH0:Tools"
sethomepath homepath
if rc ~= 0 then do
say "Failed to set home path to " || homepath
quit
exit 1
end
catalogname = "S:ToolsBackup.cat"
setcatalogname catalogname
if rc ~= 0 then do
say "I failed to set the catalog name to " || catalogname
quit
exit 1
end
setfilemode "Replace"
setlistpath "S:ToolsBackup.list"
setlogpath "S:ToolsBackup.log"
takecontrol
backup
releasecontrol
if rc ~= 0 then do
say "Backup failed; error code: " || rc
quit
exit 1
end
quit
exit 0
/*------------------------------------------------------------------*/
break_c:
say "*** Control-C recieved. Stopped by user. ***"
exit 5
/*------------------------------------------------------------------*/
error:
say "Error"
exit 6
/*------------------------------------------------------------------*/